package ua.org.nuos.sdms.clientgui.client.view.selectGroup;

import com.vaadin.ui.TabSheet;
import com.vaadin.ui.themes.ChameleonTheme;
import ua.org.nuos.sdms.clientgui.client.components.factory.WindowFactory;
import ua.org.nuos.sdms.clientgui.client.components.window.AbstractWindow;
import ua.org.nuos.sdms.clientgui.server.AppProxy;

/**
 * Created by IntelliJ IDEA.
 * User: dio
 * Date: 04.03.12
 * Time: 16:45
 * To change this template use File | Settings | File Templates.
 */
public class SelectGroupWindow extends AbstractWindow {

    private static final String WIDTH = "600";
    private static final String HEIGHT = "700";
    private static final String CAPTION = "Группы";

    public static final String ID = SelectGroupWindow.class.getSimpleName();

    public SelectGroupWindow() {
        init();
    }

    private void init() {
        window = WindowFactory.getModalWindow(WIDTH, HEIGHT, CAPTION);
        window.getContent().setSizeFull();

        AppProxy.getInstance().getComponentLocator().addWindow(ID, this);

        TabSheet tabs = new TabSheet();
        tabs.setSizeFull();
        tabs.setStyleName(ChameleonTheme.TABSHEET_BORDERLESS);
        tabs.addTab(new SelectGroupComponent(), "Выбрать группу");
        tabs.addTab(new SearchGroupComponent(), "Вступить в группу");
        tabs.addTab(new CreateGroupComponent(), "Создать группу");

        window.addComponent(tabs);
    }

}
